home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User: China
/
Acorn User China CD-ROM (UK) (Disc B)
/
Acorn User China CD-ROM (UK) (Disc B).bin
/
STUTTGART
/
DOCS
/
GENCSRC
/
POINTER.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1987-11-21
|
505 b
|
13 lines
/* Chapter 8 - Program 1 */
main() /* illustration of pointer use */
{
int index,*pt1,*pt2;
index = 39; /* any numerical value */
pt1 = &index; /* the address of index */
pt2 = pt1;
printf("The value is %d %d %d\n",index,*pt1,*pt2);
*pt1 = 13; /* this changes the value of index */
printf("The value is %d %d %d\n",index,*pt1,*pt2);
}